USE ProjectAASP_KFC
GO

INSERT INTO [User] (Name, Pass, Email, [Address], Phone) VALUES ('test','123456','test@test.com','no where','098765')
SELECT * FROM [User]

INSERT INTO Category(CategoryName) VALUES ('Combo')
INSERT INTO Category(CategoryName) VALUES ('Single')
INSERT INTO Category(CategoryName) VALUES ('Ice cream')
SELECT * FROM Category

INSERT INTO Food(CategoryId,FoodName,[Description],Price,Avalable) VALUES (1,'Combo Original chinken','2 pieces of Original chinken.<br/>1 medium Cola.<br/>',55000,1)
INSERT INTO Food(CategoryId,FoodName,[Description],Price,Avalable) VALUES (1,'Combo Spice chinken','2 pieces of spice chinken.<br/>1 medium Cola.<br/>',56000,1)
INSERT INTO Food(CategoryId,FoodName,[Description],Price,Avalable) VALUES (1,'Combo Chinken buger ','1 Chinken buger.<br/>1 medium Cola.<br/>',45000,1)
INSERT INTO Food(CategoryId,FoodName,[Description],Price,Avalable) VALUES (1,'Combo Beef buger ','1 Beef buger.<br/>1 medium Cola.<br/>',50000,1)
INSERT INTO Food(CategoryId,FoodName,[Description],Price,Avalable) VALUES (2,'1 Original chinken','1 Original chinken',27000,1)
INSERT INTO Food(CategoryId,FoodName,[Description],Price,Avalable) VALUES (2,'2 Original chinken','2 Original chinken',50000,1)
INSERT INTO Food(CategoryId,FoodName,[Description],Price,Avalable) VALUES (2,'4 Original chinken','4 Original chinken',90000,1)
SELECT * FROM Food

INSERT INTO Employee(EmployeeName,[Address],Email,Phone,CMND) VALUES ('hayate','japan','luck@atan.com','111111','123456')
SELECT * FROM Employee
GO

Create proc updateLinkHinh
AS
BEGIN
	DECLARE @Temp int
	SET @Temp = 1
	WHILE (@Temp <= (SELECT COUNT(FoodID) FROM Food))
	BEGIN
		UPDATE Food
		SET [Image] = 'images/food/'+ CONVERT(varchar(50),@Temp) +'.png'
		WHERE FoodID = @Temp
		SET @Temp = @Temp + 1
	END
END

INSERT INTO [User](Name,Pass,Email,[Address],Phone) VALUES ('Thanh','123','thanh@gmail.com','71 PVT','01239')
GO

execute updateLinkHinh